//
//  SocketManager.h
//  DYCart
//
//  Created by Apple on 2021/11/8.
//

#import <Foundation/Foundation.h>
//#import <SocketRocket/SRWebSocket.h>

//typedef NS_ENUM(NSUInteger,WebSocketConnectType){
//    WebSocketDefault = 0, //初始状态,未连接
//    WebSocketConnect,      //已连接
//    WebSocketDisconnect    //连接后断开
//};
//
//@class WebSocketManager;
//@protocol WebSocketManagerDelegate <NSObject>
//
//- (void)webSocketManagerDidReceiveMessage:(id)message;
//
//@optional
//
//- (void)webSocketManagerDidOpen;
//
//@end


NS_ASSUME_NONNULL_BEGIN

@interface DCWebSocketManager : NSObject
//<SRWebSocketDelegate>
//
//+ (instancetype)shareSocketManager;
//
//@property (nonatomic, strong) SRWebSocket *webSocket;
//@property(nonatomic,weak)  id<WebSocketManagerDelegate > delegate;
//@property (nonatomic, assign)   BOOL isConnect;  //是否连接
//@property (nonatomic, assign)   WebSocketConnectType connectType;
//
//- (void)connectServer;//建立长连接
//- (void)reConnectServer;//重新连接
//- (void)RMWebSocketClose;//关闭长连接
//- (void)sendDataToServer:(NSString *)data;//发送数据给服务器
//
//@property (nonatomic, strong) NSTimer *heartBeatTimer; //心跳定时器
//@property (nonatomic, strong) NSTimer *netWorkTestingTimer; //没有网络的时候检测网络定时器
//@property (nonatomic, assign) NSTimeInterval reConnectTime; //重连时间
//@property (nonatomic, strong) NSMutableArray *sendDataArray; //存储要发送给服务端的数据
//@property (nonatomic, assign) BOOL isActivelyClose;    //用于判断是否主动关闭长连接，如果是主动断开连接，连接失败的代理中，就不用执行 重新连接方法



@end

NS_ASSUME_NONNULL_END
